<html><head><title>Rotation</title>
<script>
var
 tab
,chr =
"\x0F\x06\x06\x06\x06\x66\x3C\x00"
//"\x7E\x63\x63\x7E\x6C\x66\x63\x00"
//"\x10\x10\x10\x10\x08\x08\x08\x08"
//"\x00\x66\x00\x18\x00\xC3\x66\x3C"
,fon = []
,box = {
  0:[ 0 ,1 ,2 ,3 ,4 ,5 ,6 ,7,15,23,31,39,47,55,63,62,61,60,59,58,57,56,48,40,32,24,16, 8]
 ,1:[ 9,10,11,12,13,14,22,30,38,46,54,53,52,51,50,49,41,33,25,17]
 ,2:[18,19,20,21,29,37,45,44,43,42,34,26]
 ,3:[27,28,36,35]
 }
,trn = 0;
function Init(body) {
 tab = document.createElement("table");
 tab.cellSpacing = 0;
 tab.cellPadding = 2;
 for(y = 0; y < 8; ++ y) {
  row = tab.insertRow(y);
  z = chr.charCodeAt(y);
  for(x = 0; x < 8; ++ x) {
   cell = row.insertCell(x);
   cell.innerText = " ";
   cell.className = "no";
   fon.push(z & 0x80 ? "on" : "no");
   z <<= 1;
  }
 }
 document.body.appendChild(tab);
 Draw();
}
function Draw() {
 for(i in box) {
  max = box[i].length;
  tur = Math.floor((trn % 32) * max / 32);
  for(j in box[i]) {
   z = box[i][(+j + tur) % max];
   tab.rows[(z >> 3) & 7].cells[(z ^ (trn & 32 ? 7 : 0)) & 7].className = fon[box[i][j]];
  }
 }
 ++ trn;
 trn %= 64;
 setTimeout("Draw()", 50);
}
</script>
<style>
td.no {
 background-color: black;
 font-size: 1px;
}
td.on {
 background-color: yellow;
 font-size: 1px;
}
</style>
</head>
<body onload='Init(this)'>
<a href='http://softrash.googlecode.com/'>Home page</a><br/>
It's an experiment for FPGA video processor with rotation feature
</body>